]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
panelMenu: Remove the gicon parameter from addIndicator, and make private
authorJasper St. Pierre <jstpierre@mecheye.net>
Fri, 19 Jul 2013 10:05:47 +0000 (06:05 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Tue, 13 Aug 2013 10:50:24 +0000 (06:50 -0400)
There's only two uses of the parameter left, which can easily be added as a
separate line below. Since it's really a private interface meant for the
indicators, make it private as well so external users are less likely to
use it.

https://bugzilla.gnome.org/show_bug.cgi?id=705845

js/ui/panelMenu.js
js/ui/status/bluetooth.js
js/ui/status/network.js
js/ui/status/power.js
js/ui/status/volume.js

index 8bad21d75c1aeddf7d4ccaaf3948f3b91eb3781a..118ed39ee13cbe8d497c356f96109a79d9443967 100644 (file)
@@ -251,9 +251,8 @@ const SystemIndicator = new Lang.Class({
         });
     },
 
-    addIndicator: function(gicon) {
-        let icon = new St.Icon({ gicon: gicon,
-                                 style_class: 'system-status-icon' });
+    _addIndicator: function() {
+        let icon = new St.Icon({ style_class: 'system-status-icon' });
         this.indicators.add_actor(icon);
         icon.connect('notify::visible', Lang.bind(this, this._syncIndicatorsVisible));
         this._syncIndicatorsVisible();
index 29f8ad811b227cb76af2f79c1ab85c8ec7b38c3c..94ce0c4c03b3d09e0f2870e7fdeba95d11a53193 100644 (file)
@@ -20,7 +20,8 @@ const Indicator = new Lang.Class({
     _init: function() {
         this.parent();
 
-        this._indicator = this.addIndicator(new Gio.ThemedIcon({ name: 'bluetooth-active-symbolic' }));
+        this._indicator = this._addIndicator();
+        this._indicator.icon_name = 'bluetooth-active-symbolic';
 
         // The Bluetooth menu only appears when Bluetooth is in use,
         // so just statically build it with a "Turn Off" menu item.
index 9be93b1507ecedf20f123ef20733dfd02dcfa80c..3ced9ca4e8c33e1b4d9aabe8a8e410a621af0547 100644 (file)
@@ -1157,8 +1157,8 @@ const NMApplet = new Lang.Class({
     _init: function() {
         this.parent();
 
-        this._primaryIndicator = this.addIndicator(null);
-        this._vpnIndicator = this.addIndicator(null);
+        this._primaryIndicator = this._addIndicator();
+        this._vpnIndicator = this._addIndicator();
 
         // Device types
         this._dtypes = { };
index bfbc40d809f18af4b2c4a505962c9a5062684f70..2994f099f5327571448597d8f91a96822f7b8971 100644 (file)
@@ -30,7 +30,7 @@ const Indicator = new Lang.Class({
     _init: function() {
         this.parent();
 
-        this._indicator = this.addIndicator(null);
+        this._indicator = this._addIndicator();
 
         this._proxy = new PowerManagerProxy(Gio.DBus.session, BUS_NAME, OBJECT_PATH,
                                             Lang.bind(this, function(proxy, error) {
index 5a9fed964f3b0eb7a00366af9bdc2671f932ca9b..b461585e7f08926955bade2a7840610dbed668b8 100644 (file)
@@ -301,7 +301,7 @@ const Indicator = new Lang.Class({
     _init: function() {
         this.parent();
 
-        this._primaryIndicator = this.addIndicator(null);
+        this._primaryIndicator = this._addIndicator();
 
         this._control = getMixerControl();
         this._volumeMenu = new VolumeMenu(this._control);